﻿using Shop.Model.DB;
using WeDonekRpc.SqlSugar;

namespace Shop.Repository.lmpl
{
    internal class UserGradeRepository : ShopBaseRepository<DBUserGrade, long>, IUserGradeRepository
    {
        public UserGradeRepository (ISqlClientFactory factory) : base(factory)
        {
        }
        public Dictionary<long, string> GetGradeName (long[] ids)
        {
            return base.Gets(a => ids.Contains(a.Id), a => new
            {
                a.Id,
                a.GradeName
            }).ToDictionary(a => a.Id, a => a.GradeName);
        }
    }
}
